//:C03:StringCharReplace.cpp
#include <algorithm>
#include <cassert>
#include <string>
using namespace std;

int main(){
	string s("aaaXaaaXXaaXXXaXXXXaaa");
	replace(s.begin(), s.end(), 'X', 'Y');
	assert(s == "aaaYaaaYYaaYYYaYYYYaaa");
}




